package org.liveboardgames.agricola.vo.card
{
	import com.adobe.cairngorm.vo.IValueObject;

	import org.liveboardgames.agricola.model.enums.ResourceTypeEnum;

	[Bindable]
	[RemoteClass(alias="org.liveboardgames.agricola.domain.card.CookingImprovementCard")]
	public class CookingImprovementCard extends BakingImprovementCard implements CookingPlace, Oven, IValueObject
	{
		public var vegetable:int;

		public var sheep:int;

		public var boar:int;

		public var cattle:int;

		public function CookingImprovementCard(vegetable:int = 0, sheep:int = 0, boar:int = 0, cattle:int = 0, grain:int =
			0):void
		{
			super(0, grain);
			this.vegetable = vegetable;
			this.sheep = sheep;
			this.boar = boar;
			this.cattle = cattle;
		}

		public function getFoodQuantityForType(animalType:String):int
		{
			var result:int = 0;
			if (ResourceTypeEnum.SHEEP == animalType)
			{
				result = sheep;
			}
			else if (ResourceTypeEnum.BOAR == animalType)
			{
				result = boar;
			}
			else if (ResourceTypeEnum.CATTLE == animalType)
			{
				result = cattle;
			}
			return result;
		}
	}
}